package com.xjl.example.publish;

import lombok.extern.slf4j.Slf4j;

/**
 * Created by xiaojinlu1990@163.com on 2019/12/24.
 *
 *  对象在未发布完成就被外部调用，是不安全的
 */
@Slf4j
public class Escape {

    private int thisCanEscape = 0;

    public Escape() {
       new InnerClass();
    }
    private class InnerClass{
        public InnerClass() {
            log.info("{}",Escape.this.thisCanEscape);
        }
    }

    public static void main(String[] args) {
        new Escape();
    }
}
